<?php $this->incl('header.tpl.php'); ?>

<h1>Пользователи</h1>

<h2>Новый пользователь</h2>
<form action="add_user.php" method="post">
    <p>
        <label for="login">Логин:</label>
        <input type="text" id="login" name="login" />
    </p>

    <p>
        <label for="password">Пароль:</label>
        <input type="password" id="password" name="password" />
    </p>

    <p>
        <label for="full_name">Имя:</label>
        <input type="text" id="full_name" name="full_name" />
    </p>

    <p>
        <input type="submit" value="Добавить пользователя" />
    </p>
</form>

<table>
    <tr>
        <th>ID</th>
        <th>Логин</th>
        <th>Полное имя</th>
    </tr>
    <?php foreach ($this->users as $user): ?>
        <tr>
            <td><?php echo htmlspecialchars($user->getId()); ?></td>
            <td><?php echo htmlspecialchars($user->login); ?></td>
            <td><?php echo htmlspecialchars($user->full_name); ?></td>
        </tr>
    <?php endforeach; ?>
</table>
<?php $this->incl('footer.tpl.php'); ?>
